<template>
  <van-nav-bar :fixed="fixed" :border="border" :z-index="zIndex" @click-left="comeBack">
    <slot name="left" slot="left"></slot>
    <slot name="title" slot="title"></slot>
    <slot name="right" slot="right"></slot>
  </van-nav-bar>
</template>

<script>
export default {
  name: 'ipbes-header',
  props: {
    fixed: {
      type: Boolean,
      default: false
    },
    border: {
      type: Boolean,
      default: false
    },
    zIndex: {
      type: Number,
      default: 1
    }
  },
  methods: {
    comeBack () {
      this.$router.go(-1)
    }
  }
}
</script>

<style lang="less">
</style>
